#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int Test(int val)
{
	int count = 0;
	int i = 0;
	for (i = 0; i < 32; i++)
	{
		if (((val >> i) & 1) == 1)
			count++;
	}
	return count;
}

int main()
{
	int n;
	cin >> n;
	int sum = Test(n);
	if (n != 0)
		cout << sum;

	else
		cout << 0;
}